<?php
class AutoloadDbConfig
{
    public static function init($initTables = array('config'))
    {
        $arr = array();
        foreach ($initTables as $tbl_name) {
            //$arr['registry'][$tbl_name] = Yii::app()->cache->get('registry_' . $tbl_name);
            $arr['registry'][$tbl_name] = false;
            if ($arr['registry'][$tbl_name] == false) {
                $as = new ConfigBase();
                $arr['registry'][$tbl_name] = $as->getSettings();
                //Yii::app()->cache->set('registry_' . $tbl_name, $arr['registry'][$tbl_name]);
            }
        }
        //$as = new ConfigBase();
        //$arr['registry'][$tbl_name] = $as->getSettings();
        Yii::app()->setParams($arr);
    }
}